/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seaworldsoft.publish.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

/**
 *
 * @author sam
 */
@Entity
@Table(name="sys_channel")
public class Channel {
    @Id
	@TableGenerator(name = "channel", table = "sys_generator", pkColumnName = "key_name", pkColumnValue = "Channel_ID", valueColumnName = "key_value", initialValue = 1, allocationSize = 1)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "channel")
    
    private int channelId; //主键
    
    
    /**
     * 频道编号
     */
    @Column(length=50)
    private String channelNo;
    
    /**
     * 频道名称
     */
    @Column(length=50)
    private String channelName;
    
    /**
     * 发布状态 0：未发布 1：已发布
     */
    private boolean status;
    
    /**
     * 绑定显示模版
     */
    @OneToOne
    @JoinColumn(name="TPL_ID")
    private Template template;
    
    /**
     * 频道类型 common ：普通（默认） info:信息 notice:公告  news:新闻
     */
    private String channelType;
    
    /**
     * 绑定的审核流程
     */
    private int workFlowInstance;
    
    /**
     * 浏览权限类型 0:所有人（默认），1：自定义（按角色） 2：自定义（按组织）
     */
    @Column(length=1)
    private int viewType;
    
    /**
     * 发文权限 0：无限制 1：自定义（角色）2：定义组织
     */
    @Column(length=1)
    private int createType = 0;

    public int getChannelId() {
        return channelId;
    }

    public void setChannelId(int channelId) {
        this.channelId = channelId;
    }

    public String getChannelNo() {
        return channelNo;
    }

    public void setChannelNo(String channelNo) {
        this.channelNo = channelNo;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public Template getTemplate() {
        return template;
    }

    public void setTemplate(Template template) {
        this.template = template;
    }

    public String getChannelType() {
        return channelType;
    }

    public void setChannelType(String channelType) {
        this.channelType = channelType;
    }

    public int getWorkFlowInstance() {
        return workFlowInstance;
    }

    public void setWorkFlowInstance(int workFlowInstance) {
        this.workFlowInstance = workFlowInstance;
    }

    public int getViewType() {
        return viewType;
    }

    public void setViewType(int viewType) {
        this.viewType = viewType;
    }

    public int getCreateType() {
        return createType;
    }

    public void setCreateType(int createType) {
        this.createType = createType;
    }
    
    
    
    
        
}
